package com.example.androidpattern.decorator.classes;

import com.example.androidpattern.decorator.interfaces.IRouJiaMo;

/**
 * @ClassName: RJMEggs$
 * @Description: java类作用描述
 * @Author: xinya
 * @CreateDate: 2020/12/18$ 17:37$
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
public class RJMEggs extends RJMDecorator {
    private int price;
    public RJMEggs(IRouJiaMo rouJiaMo, int price) {
        super(rouJiaMo);
        this.price = price;
    }

    @Override
    public int price() {
        return super.price() + price;
    }

    @Override
    public String info() {
        return super.info() + " 多加一个鸡蛋";
    }
}
